package com.tuanzi.loan.business.service.member.impl;

import com.tuanzi.loan.business.repository.member.custom.LoanMemberOrderCustomRepository;
import com.tuanzi.loan.business.service.member.LoanMemberOrderService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.member.LoanMemberOrderRequest;
import com.tuanzi.loan.vo.response.member.LoanMemberOrderResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: chenweijun
 * @Date: 2019/3/29 19:40
 * @Description:
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class LoanMemberOrderServiceImpl implements LoanMemberOrderService{

    @Autowired
    private LoanMemberOrderCustomRepository loanMemberOrderCustomRepository;

    @Override
    public Page<LoanMemberOrderResponse> list(PageSearcher<LoanMemberOrderRequest> pageSearcher) {
        return loanMemberOrderCustomRepository.list(pageSearcher.getSearchCondition(), pageSearcher.getPageable());
    }

}
